1. Field
The present disclosure relates to a method for converting analog data into digital data for analog input module, and more particularly, to a method for converting analog data to digital data for analog input module configured to stably output a digital data by minimizing the influence of noise inputted along with analog data.
2. Background
An analog input module employing an ADC (Analog-to-Digital Converter) has been widely used in industrial fields. The analog input module is susceptible to data variation according to installation environment, and the stability of conversion data can be damaged by noisy environment. Recently, many technologies have been proposed to prevent the stability of conversion data from being damaged.
The conventional technique as described above is disclosed in for example Japanese Laid-open Patent Publication No. 2000-068833 (Published on Mar. 3, 2000). The technique teaches a digital filter system consisting of an A/D converter and a means that eliminates extremely larger (or smaller) data among conversion data by the number of times of sampling extracted by over-sampling and averages the remaining data, whereby noise patterns generated by environments can be digitally eliminated.
In the conventional analog input module including the digital filtering system, several analog-to-digital conversions are generally performed to stabilize the conversion data, and a stable data is selected from among a plurality of conversion data. For example, in a module that has obtained a time for three times of conversion, an average value except for the maximum and minimum values from results of three times of conversion is displayed as an analog-to-digital conversion value. Alternatively, an average value from the results of the three times of conversion may be displayed as an analog-to-digital conversion value.
However, there is a drawback in the conventional analog input module in that conversion times must be increased to enhance stability of conversion data. This is because the data conversion time increases in proportion to the conversion times (n) and therefore, the conversion times (n) must be solved within a given conversion speed of the module. As a result, the data stability cannot be conventionally pursued through increased conversion times if a product is enabled to realize by determining the conversion times (n) within a conversion speed of an allowed product specification.
For example, assuming that a conversion speed of a specification is 100 μs and a conversion speed of an analog input module to be applied is 30 μs, maximum allowable conversion times of the analog input module is 3 times. Assuming that an ideal digital conversion data to the exemplified analog input module is 1,000, a satisfactory result may be obtained, because an average of three input data is 1,000, as the three times of conversion data is respectively 998, 1002, and 1000.
However, in case conversion data of 950, 1000, and 1002 is inputted, an average of the three data becomes 984 due to influence by noise, such that an unsatisfactory result can be obtained against a conversion data desired by a user.
Therefore, in order to avoid the above-mentioned situations, a designer may select a method of selecting an average (mean) value that dispenses with maximum and minimum values. However, even in this case, if two continuous values are affected by noise, a result desired by the designer cannot be achieved. Therefore, it is very difficult to expect any higher stability unless the conversion times (n) is increased. Furthermore, increased conversion times (n) inevitably increases data conversion time to result in a problem of failing to satisfy a conversion speed specified by the specification. As a result, there may occur a case of correcting hardware in the worst case, and if the case ever occurs, it is inevitable to increase the time and cost.
Alternatively, among methods of stabilizing conversion data in the analog input module, there may be a method of stabilizing data, considering that a change has occurred to a data only when the change to a lowest level bit in an analog-to-digital converter is greater than a predetermined level. This method has borrowed a hysteresis characteristic to an input signal, the method of which is responsive only to a case where data fluctuation is greater than a predetermined value, such that a fluctuation unit of the data is recognized as the predetermined value. Therefore, there may be generated a phenomenon where the data fluctuates to show a stair shape in a width of the predetermined value, to thereby create a problem of a fine control being inappropriate.
In order to obviate one or more of the above-mentioned problems, a digital conversion method appropriate both to a fine control and to stability of conversion data has been required by the relevant conventional prior art, free from fluctuations in conversion times, conversion speed and conversion time in an analog input module.